home *** CD-ROM | disk | FTP | other *** search
/ Plug-In Power Pack for Netscape Communicator / Plug-In Power Pack for Netscape Communicator.iso / plugins / dataviews / dvtools / examples / programs / readme.txt < prev    next >
Encoding:
Text File  |  1997-05-08  |  9.0 KB  |  200 lines

  1. =======================================================================
  2. Introduction
  3.  
  4. This directory contains example programs designed to help you learn some 
  5. DV-Tools concepts and coding techniques. You should use the document
  6. "DV-Tools Getting Started" to introduce you to DV-Tools routines, concepts
  7. and programming techniques. This document highlights coding basics and some
  8. of the most common features of DV-Tools programs. The document uses six of
  9. the example programs to introduce you to DV-Tools routines and concepts: 
  10. playback.c, win_evnt.c, dp_cre.c, dvtools.c, bf_rebnd.c, and inputs.c.
  11.  
  12. Users with Small Screens: The examples are designed to run on a large screen 
  13. (1024x768). If you have a smaller or low-resolution screen the examples will 
  14. still run, but they may not display correctly. Windows may be positioned so 
  15. that they are partly off the screen. In examples with graphs, you may get a 
  16. "Viewport too small" error resulting in the graph not being drawn.
  17.  
  18. Users with 16-Color Displays: The example views are designed to run on a 
  19. 256-color display. On a 16-color display, some color combinations may look 
  20. strange or lack enough contrast to distinguish objects. To improve the
  21. appearance, you can load the example view in DV-Draw and edit colors on
  22. your machine.
  23. =======================================================================
  24.  
  25. To use the examples, first open an MS-DOS command prompt, and go to the 
  26. examples directory:
  27.  
  28.     cd <dataviews>\dvtools\examples\programs
  29.  
  30. To make a single example, type:
  31.  
  32.     nmake <example_name>.exe
  33.  
  34. For example:
  35.  
  36.     nmake axis.exe
  37.  
  38. To make all the examples with a single operation, type:
  39.  
  40.     nmake
  41.  
  42. To run an example: 
  43.         Open the File Manager.
  44.         Go to the <dataviews>\dvtools\examples\programs directory.
  45.         Select the name of the example that you want to run.     
  46.  
  47. You can also run the example from the command prompt.
  48. To run an example, type:
  49.  
  50.     <example_name> -options
  51.  
  52. All of the examples use a NULL path in their call to TInit(), so be sure 
  53. that the DVPATH configuration variable is set.
  54.  
  55. All programs are set up to run without any arguments. If you don't specify a 
  56. device with DVDEVICE you must specify one on the command line. Some examples 
  57. take optional arguments. Look at the code and study the example.
  58.  
  59. To exit an example, type <q|Q>, press the right mouse button, or select a 
  60. "QUIT" object.
  61.  
  62. A good learning path is to run the examples in a debugger so you can see 
  63. what each function call accomplishes. Because some graphics are buffered, 
  64. you may want to call GRflush as you step through the examples.
  65.  
  66. =======================================================================
  67.  
  68. axis.c  Exercises the VUax* routines. This example is useful to programmers 
  69. who are writing their own display formatters and drawing their own axes.
  70.  
  71. buf_rebind.c  Shows how to attach your program's data to your dynamic 
  72. objects, by-passing the DataViews data source facility. The routine 
  73. TvdPutBuffer is used to "rebind" your data.
  74.  
  75. buf_stuff.c  Shows how to attach your application's data to the DataViews 
  76. data source variables. Instead of updating the data source with DataViews 
  77. routines, "stuff" your own data into the data source variable's buffer. 
  78. TdsvGetBuffer is the routine used to accomplish this.
  79.  
  80. dp_create.c  Shows how to create drawports (DataViews viewing windows) using 
  81. a "layout" file created in DV-Draw. The layout file contain rectangles that 
  82. define where each drawport should appear. Uses TdrGetNamedObject, VOobBox, 
  83. TdpCreateStretch.
  84.  
  85. dp_manip.c  Shows how to ZOOM, PAN and REDRAW drawports using functions such 
  86. as TdpCreateStretch(), TdpZoom(), TdpPan(), TdpZoomTo(), TdpRedraw(), and 
  87. TscReset(). A menu and a scrollbar are used to control the display. 
  88.  
  89. dragging.c  Shows how to "drag" an object over other objects by using the XOR 
  90. drawing mode. GRset and VOloState are used.
  91.  
  92. dvtoolsdemo.c  Shows how to manage views created in DV-Draw, allowing the 
  93. user to switch from view to view. This is done by getting the name of the 
  94. "picked" object and finding a view with the same name. This program "loads" 
  95. the view every time it's displayed.
  96.  
  97. dynamic_sd.c  Demonstrates the mapping of dynamic subdrawing datasource 
  98. variables to the main data source list within DV-Tools. It also shows how to 
  99. manage and collect the list of data source variables from the main view and 
  100. subdrawing views using linked lists.
  101.  
  102. dynamics.c  Shows how to assign different types of dynamics to objects. This 
  103. example creates a simple dial rotating inside a circle. VOdyCreate, 
  104. VOdySetEraseMethod, VOdyAttachData, VOobDySet, VOttCreate, VOttAddThresh, 
  105. and VOvdCreate are used. A dynamic text object is also shown.
  106.  
  107. event_post.c  Shows how to use VUerBoundaryEventPost to post different kinds 
  108. of event requests. Choose a posting method from the menu then try to select 
  109. the polygon objects.
  110.  
  111. forms.c  Shows how to program text entry in a "form," that is, how to use a 
  112. DV-Draw view with several text input objects but focus keyboard entry go to 
  113. a given input object regardless of the position of the cursor.
  114.  
  115. graph_disp.c  Shows how to use separate drawports for each graph in order to 
  116. continually update overlapping graphs. Demonstrates zooming, partial 
  117. redrawing, and changing variable range on graphs.
  118.  
  119. graph_query.c   Demonstrates how to use VPdgdfquery() to retrieve information 
  120. about a graph. The routine is used to get the the selected data slot and the 
  121. data value of the variable displayed at the user selected point. A line is 
  122. drawn at the selected data slot while the selected data value is displayed 
  123. in a digits graph.
  124.  
  125. graph_scroll.c  Shows how to scroll through data for a graph and display 
  126. different data sets in the graph. The example uses rebinding, indirect 
  127. access mode and a tick labeling function. It also demonstrates the use of 
  128. VUerWinEventPost for handling window events.
  129.  
  130. image_colors.c  Shows ways of creating color tables based on the colors of 
  131. images or icons being displayed. VOpmBestColors, VUctBestColors, and 
  132. VUctTransform are the most important functions used.
  133.  
  134. in_create.c  Shows how to create input objects programmatically. Several 
  135. input objects are created and embedded into a Combiner. VOinCreate, 
  136. VOinTechnique, VOinPutList, VOinPutListValues are some of the routines used.
  137.  
  138. in_multiplex.c  Shows how to create a multiplexor input object 
  139. programmatically.
  140.  
  141. inputs.c  Shows how to set up Service Result events for input objects 
  142. created in DV-Draw. The example performs different actions depending on the 
  143. menu item selected.
  144.  
  145. move_object.c  Demonstrates how to move objects around the screen using 
  146. VOobPtGet() and VOptMove().
  147.  
  148. ob_box.c  Demonstrates how the function VOobBox() works.
  149.  
  150. palette.c  Shows how to customize your own color table for use in 
  151. applications. The color table can be saved to a file and used as the primary 
  152. color table.
  153.  
  154. pixmaps.c  Demonstrates the use of pixmaps, images and icons. Uses the VOpm, 
  155. VOim, and VOic routines.
  156.  
  157. pixreps.c  Demonstrates the use of pixreps and pixscans.
  158.  
  159. playback.c  Plays back a view created in DV-Draw. This is the simplest DV-
  160. Tools example. It shows the core of DV-Tools programming.
  161.  
  162. popup.c  Shows how to bring up "popup" inputs from views created in DV-Draw. 
  163. The popup controls the color and patterns of a rectangle.
  164.  
  165. proto_multi.c  Shows how to invoke two prototypes from DV-tools. The Tproto routines are used to run each prototype in its own window.
  166.  
  167. rule_create.c  Shows how to add and modify rules associated with objects and 
  168. the view. VOruCreate, VUruGetInfo, VOruSetInfo, VOruAddToOb, and 
  169. VOruGetFromOb are used.
  170.  
  171. slot_create.c  Shows how to attach data to objects using the SLOT mechanism. 
  172. VOskDeclare, VOobSetSlot, and VOobGetSlot are some of the routines used.
  173.  
  174. symload.c  Shows how to manage views the way dvtools.c does. This program 
  175. differs from dvtools.c in that it "pre-loads" all the possible views, using 
  176. the symbol table routines (VT) to manage the view names. This allows 
  177. switching from view to view without waiting for the view to be "loaded."
  178.  
  179. text_editor.c  Demonstrates how to use the text editor input object. This is 
  180. a multi-line text entry input object.
  181.  
  182. textarray.c  Exercises the VUta* routines which are used to manipulate a 
  183. window into a 2-D array of text. This lets you provide basic terminal 
  184. emulation.
  185.  
  186. view_create.c  Demonstrates the basics of creating the entire structure of a 
  187. view within a DV-Tools program. Nothing is pre-created or pre-loaded from 
  188. DV-Draw. Graphs, dynamic color objects, and dynamic subdrawing objects are 
  189. created.
  190.  
  191. view_merge.c  Shows how to merge two previously saved views into one larger 
  192. view. Uses TviMergeAddDataSources and TviMergeDrawing.
  193.  
  194. win_event.c  Exercises event gathering in a single window using 
  195. VOscWinEventPoll(). Events such as, RESIZE, QUIT, BUTTON_DOWN, EXPOSE are 
  196. examined. Uses VOscWinEventMask(), VOloWinEventGet(), VOloType and GRset().
  197.  
  198. win_multi.c  Exercises event gathering in multiple windows using 
  199. VOloWinEventPoll().
  200.